class ChannelCreateServeModel {
  String? channelId;
  List<IceServers>? iceServers;

  ChannelCreateServeModel({this.channelId, this.iceServers});

  ChannelCreateServeModel.fromJson(Map<String, dynamic> json) {
    channelId = json['channel_id'];
    if (json['ice_servers'] != null) {
      iceServers = <IceServers>[];
      json['ice_servers'].forEach((v) {
        iceServers!.add(IceServers.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['channel_id'] = channelId;
    if (iceServers != null) {
      data['ice_servers'] = iceServers!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class IceServers {
  List<Map>? urls;
  String? username;
  String? credential;

  IceServers({this.urls, this.username, this.credential});

  IceServers.fromJson(Map<String, dynamic> json) {
    urls = [];
    if (json['urls'] != null) {
      json['urls'].forEach((v) {
        urls?.add(v);
      });
    }

    username = json['username'];
    credential = json['credential'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['urls'] = urls;
    data['username'] = username;
    data['credential'] = credential;
    return data;
  }
}
